home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
STRINGS
/
PACKAGE6
/
REAL_VAL.DOC
< prev
next >
Wrap
Text File
|
1990-07-25
|
1KB
|
38 lines
--------------------------------------------------------------------------
RealValue
--------------------------------------------------------------------------
declaration: function RealValue( AString:
TypeString):
real;
purpose: Convert the string of characters in AString from 1 to
Astring.Length into a RealValue.
preconditions: AString._PackedArray must be filled from 1 to AString._Length.
AString._Length must be filled with an integer.
All elements in _PackedArray are valid ('-', '.', '+',
['0'..'9'])
postconditions: RealValue is returned with the numbers represented by the
string.
special cases: The string may or may not have a '+' or '-' sign in the first
place in the array.
example: var
AString:
TypeString;
begin
.
.
.
writeln( output, RealValue( AString) );
.
.
.
end
--------------------------------------------------------------------------